<template>
  <div>
      <h1>继续绑定账号</h1>
      <P>{{uid}}</P>
      用户名：<input type="text" v-model="username">
      密码：<input type="text" v-model="password">
      <button @click="bang()">绑定</button>
  </div>
</template>

<script>
import axios from 'axios'
export default {
    data(){
        return {
            uid:this.$route.query.uid,
            username:"",
            password:"",
        }
    },methods: {
      bang(){
          var data={
              username:this.username,
              password:this.password,
              uid:this.uid
          }
          axios({
              url:"http://127.0.0.1:8000/weiboo",
              method:"post",
              data:data,
          }).then(resp=>{
              if(resp.data.code==400){
                  alert("请重试")
              }else{
                  alert("绑定成功")
              }
          })
      }  
    },
}
</script>

<style>

</style>